﻿namespace PillBox.Client.ViewModels
{
    using System.Collections.Generic;
    using System.ComponentModel.Composition;
    using PillBox.Client.Framework;
    using PillBox.Client.Model;

    [Export]
    public class PersonChoiceViewModel : ViewModelBase
    {
        private Person _person;
        public Person Person
        {
            get { return _person; }
            set
            {
                _person = value;
                RaisePropertyChanged(() => Person);
            }
        }

        public IEnumerable<IResult> Open()
        {
            yield return Show.Screen<PersonDetailsViewModel>().Configured(x => x.With(this.Person));
        }
    }
}